package com.java1412.web.service.impl;

import com.java1412.common.entity.LoanInfo;
import com.java1412.common.utils.R;
import com.java1412.common.utils.ResponseEnum;
import com.java1412.web.mapper.LoanInfoMapper;
import com.java1412.web.service.LoanInfoService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author java1412
 * @since 2025-05-21 16:50
 */
@Service
@Transactional
public class LoanInfoServiceImpl implements LoanInfoService {

    @Resource
    private LoanInfoMapper loanInfoMapper;

    @Override
    public R findByProductType(Integer productType) {
        List<LoanInfo> loanInfoList = loanInfoMapper.findByProductType(productType);
        return R.r(ResponseEnum.LOAN_INFO_FIND_SUCCESS, loanInfoList);
    }
}
